1. Field of the Invention
The present invention relates to a coding device and method which are suitable for coding an input signal with high efficiency, and transmitting, recording, playing back, and decoding the coded signal so as to obtain a playback signal. The invention also relates to a recording medium in which a coded signal is recorded.
2. Description of the Related Art
Various techniques for coding signals representing acoustic information or audio information (hereinafter simply referred to as “audio signals”) with high efficiency are known. For example, a block frequency-band division technique, i.e., a so-called “transform coding technique”, is known. In this technique, a time-domain audio signal is formed into blocks in predetermined time units, and a time-domain signal for each block is transformed into a frequency-domain signal (spectrum transform) so as to be divided into a plurality of frequency bands. The signal in each band is then coded. Another method, a non-block frequency-band division technique, i.e., a so-called “sub-band coding (SBC) technique”, is known in which a time-domain audio signal is divided into a plurality of frequency bands without being formed into blocks, and a frequency-domain audio signal is then coded. Another high-efficiency coding technique, which is a combination of the above-described sub-band coding technique and the transform coding technique, has been considered. In this case, for example, an audio signal is divided into a plurality of frequency bands according to the sub-band coding technique, the signal for each frequency band undergoes spectrum transform into a frequency-domain signal, and each spectrum-transformed frequency band signal is coded.
The above-described coding techniques are applicable to an audio signal consisting of a plurality of channels. More specifically, the coding techniques are applicable to each channel of the audio signal, for example, to an L channel corresponding to a left speaker, and to an R channel corresponding to a right speaker. The coding techniques can also be used for a signal obtained by adding an L-channel signal and an R-channel signal, i.e., an (L+R)/2 signal. Also, an (L+R)/2 signal and an (L−R)/2 signal can be coded by using the above-described coding techniques. The amount of data required for coding a single channel signal is one half the amount of data required for independently coding signals for two channels. Accordingly, the following standards are defined for recording a signal on a recording medium. Two modes are provided: a one-channel monaural recording mode and a two-channel stereo recording mode, and when a long recording time is required, monaural recording is performed.
In addition to the above-described techniques, other high-efficiency coding techniques are being developed, and by adopting the standards integrating new coding techniques, a longer recording time can be achieved, and higher-quality audio signals can be recorded with the same recording time.
In this case, when determining the above-described standards, by considering changes or extensions to the standards in the future, a space is often reserved on a recording medium for recording, for example, flag information concerning the standards. More specifically, for example, when the standards are initially decided, “0” is recorded as one-bit flag information, and when the standards are changed, “1” is recorded into the flag information. A playback apparatus which is compatible with the new standards checks whether the flag information indicates “0” or “1”, and if the flag information indicates “1”, a signal is read and played back from the recording medium according to the new standards. If the flag information indicates “0”, a signal is read and played back from the recording medium according to the previous standards on the condition that the corresponding playback apparatus is compatible with the previous standards. If the playback apparatus is not compatible with the previous standards, the signal is not played back.
The assignee of the invention of this application has disclosed the following method in the specification and the drawings of Japanese Unexamined Patent Application Publication No. Hei 10-302405. In this method, when coding a multi-channel signal by an encoder in units of frames whose size cannot be controlled, the following arrangement is used. A channel signal to be coded by predetermined standards (hereinafter referred to as “old standards”) is temporarily coded with a number of bits smaller than the maximum number of bits which can be allocated into the corresponding frame. Then, a signal of another channel to be coded is disposed in a space in the frame, thereby enabling a playback apparatus which is compatible with the old standards (such an apparatus is hereinafter referred to as an “old-standard playback apparatus”) to play back signals of less channels. Additionally, by using a playback apparatus compatible with new standards (such an apparatus is hereinafter referred to as a “new-standard playback apparatus”), signals of a greater number of channels can be played back.
According to this technique, a channel signal which cannot be played back in the old-standard playback apparatus can be coded according to a coding technique with higher efficiency than that of the old standards, thereby preventing a decrease in the audio quality caused by the coding of a multi-channel signal. In this method, signal A=(L+R)/2 is recorded in an area which can be played back by the old-standard playback apparatus, and signal B=(L−R)/2 is recorded in an area which cannot be played back by the old-standard playback apparatus. As a result, the monaural signal A can be played back by the old-standard playback signal, while stereo signals L and R can be played back from the channels A and B by the new-standard playback apparatus.
The same assignee has also disclosed the following method in the specification and the drawings of International Patent Publication WO98/46045. A signal recorded in an area which cannot be played back by an old-standard playback apparatus is selected from (L−R)/2, L, and R, thereby reducing the influence of quantization errors which cause problems when performing coding.
As described above, signals of more channels can be played back by extending the standards, and the standards can be extended by using a signal coding device which enables an old-standard playback apparatus to play back signals of less channels, and then, a stereo signal is played back. In this case, when the stereo signal is played back, quantization errors caused by the coding operation sometimes become problematic according to the type of stereo signal.
Thus, the same assignee has disclosed the following technique in Japanese Unexamined Patent Application Publication No. Hei 11-32399 (hereinafter referred to as “document 1”). The mixture ratio of a plurality of channel signals is calculated, and the channel signals are mixed at regular intervals (frames) based on the calculated mixture ratio. Then, a plurality of processing signals corresponding to the plurality of channel signals are generated from the mixed channel signals, and each of the processing signals is coded. With this arrangement, the influence of quantization errors caused by the coding and decoding operation on the audio quality can be reduced.
In the coding device disclosed in document 1, stereo signals L and R are mixed at a channel mixture ratio R_m to generate channel A and channel B, which are expressed by the following equations (1) and (2), respectively.A=(L+R)/2  (1)B=(L−R)(1−R—m)(1+R—m)/2  (2)In equation (2), R_m is calculated based on a correlation coefficient R_c indicated in the following equation (3):R—c=S—lr/(S—l*S—r)  (3)where S_l and S_r indicate the standard deviations of the L channel and the R channel, respectively; and S_lr represents the covariance of the L and R channels. When the increases/decreases of both the channels are equal to each other, the channel correlation coefficient R_c is 1.0, and conversely, when the increases/decreases are totally opposite, R_c is −1.0. When the increases/decreases of the two channels do not have any correlation, R_c is close to 0. That is, when the L and R channels are monaural signals, R_c is 1.0, and when the L and R channels are 180° out of phase with each other, R_c is −1.0. For typical stereo signals on the L and R channels, R_c is 0.5 or greater in most cases.
Based on this channel correlation coefficient R_c, the channel mixture ratio R_m is determined, and the above-described channel signals A and B are generated based on the channel mixture ratio R_m.
According to document 1, by coding the channel signals A and B generated as described above, the influence of quantization errors caused by coding and decoding the signals A and B on the audio quality can be reduced.
According to the technique disclosed in document 1, however, since the channel mixture ratio R_m is periodically calculated at regular intervals, audio problems may sometimes occur in an input signal which satisfies predetermined conditions. More specifically, in document 1, the channel mixture ratio is determined in each predetermined zone (frame) in which a spectrum obtained by transforming that zone (frame) is to be coded. That is, the channel mixture ratio R_m(j) is determined for the j-th frame. Accordingly, when a predetermined waveform continues regularly, discontinuous components are generated in a frame boundary area in the coding device if the channel mixture ratio R_m(j) is changed for each frame. If the signal having such discontinuous components is quantized and coded, it cannot be faithfully reproduced in the decoding device, thereby increasing quantization errors to such a degree as to be perceived as noise. Examples of an input signal having a regular waveform include single-frequency signals, such as musical instruments, for example, bass instruments, and time signals.